#include "GameProcess.h"
#include "Cameras/FPSCamera.h"
#include "Object3D/Object3D.h"
#include "MathTypes.h"
#include "RenderManager.h"
#include "InputManager.h"
#include "Base.h"
#include "Core.h"

#if defined (_DEBUG)
#include "Memory/MemLeaks.h"
#endif

//-------------------------------------------------
CGameProcess::CGameProcess()
	: m_pObjectCamera(NULL)
	, m_pFPSCamera(NULL)
{

}

//-------------------------------------------------
CGameProcess::~CGameProcess()
{
	CHECKED_DELETE(m_pFPSCamera);
	CHECKED_DELETE(m_pObjectCamera);
}

//-------------------------------------------------
void CGameProcess::Initialize()
{
	Vect2u l_Screen = RENDER_MANAGER->GetScreenSize();

	m_pObjectCamera = new CObject3D(Vect3f(-5.0f, 3.0f, 0.0f), v3fUNIT, 0.f, -0.5f, 0.f);
	m_pFPSCamera = new CFPSCamera(0.1f, 100.f, Math::Constants::ePI2<float>(), l_Screen.x/(float)l_Screen.y, m_pObjectCamera);

	CORE->SetCamera(m_pFPSCamera);
}

//-------------------------------------------------
void CGameProcess::Update(float _fElapsedTime)
{
	if( INPUT->DoAction("Jump") )
	{
		int a=1;
	}
}

//-------------------------------------------------
void CGameProcess::Render()
{

}